package lynch.map 
{
	import Elegant.display.Container;
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.DisplayObject;
	import flash.geom.Point;
	import flash.geom.Rectangle;
	
	/**
	 * ...
	 * @author 小痛
	 */
	public class MiniMap extends Container 
	{
		private var img:Bitmap;
		
		public function MiniMap() 
		{
			super();
			img = new Bitmap();
		}
		
		/**
		 * update the position of mini map
		 * @param	p
		 */
		public function updateMiniMapPos(p:Point):void
		{
			img.x = p.x;
			img.y = p.y;
		}
		
		public function updateInfo(bitmapData:BitmapData):void
		{
			img.bitmapData = bitmapData;
		}
		
		//-----------------------getter / setter----------------------
		/**
		 * @inheritDoc
		 */
		override public function get mask():DisplayObject 
		{
			return img.mask;
		}
		
		override public function set mask(value:DisplayObject):void 
		{
			addChild(value);
			img.mask = value;
		}
	}
}